package cn.trasen.his.poc.std.api.model.major;

import cn.trasen.his.poc.std.api.emums.BedStatusEnum;
import pro.shushi.pamirs.boot.base.ux.annotation.field.UxWidget;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxDetail;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxForm;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxTableSearch;
import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.IdModel;
import pro.shushi.pamirs.meta.enmu.NullableBoolEnum;

/**
 * WardBed
 * @author shushi
 */
@Model.model(WardBed.MODEL_MODEL)
@Model(displayName = "床位", labelFields = "bedNo")
@Model.Advanced(ordering = "bedSort ASC")
public class WardBed extends IdModel {

    public static final String MODEL_MODEL = "ts.his.WardBed";

    @UxTableSearch.FieldWidget(@UxWidget())
    @Field.String
    @Field(displayName = "床位号", required = true)
    private String bedNo;

    @Field.Integer
    @Field(displayName = "床位排序号")
    private Integer bedSort;

    @UxTableSearch.FieldWidget(@UxWidget())
    @Field.Enum
    @Field(displayName = "床位状态", defaultValue = "0")
    private BedStatusEnum bedStatus;

    @Field.String
    // 默认的表单页面不显示(都可以通过界面设计器配置，这里主要是默认页面交互，不去设计器拖页面)
    @UxForm.FieldWidget(@UxWidget(invisible = "true"))
    //显示类型的字段是前端需要，因为不需要在DB中建字段
    @Field(displayName = "床位状态显示", store = NullableBoolEnum.FALSE)
    private String bedStatusDisName;

    @Field.Text
    @Field(displayName = "备注", summary = "备注")
    private String remark;

    @Field.String
    @UxDetail.FieldWidget(@UxWidget(readonly = "true"))
    @Field(displayName = "录入人", summary = "录入人")
    private String inputUser;

}
